const { Article } = require('../../model/article');



module.exports =async (req, res,next) => {
    //    接受参数
    const { title,publishDate,cover,content } = req.body;
    const author = req.query.author;


await Article.updateOne({author:author}, {
    author:author,
    title:title,
    publishDate:publishDate,
    cover:cover,
    content:content
})
res.redirect('/admin/article');

}